local ma__shenji = fk.CreateSkill {
  name = "ma__shenji",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["ma__shenji"] = "深忌",
  [":ma__shenji"] = "锁定技，以你为目标的多目标牌最后对你结算。",

  ["$ma__shenji1"] = "",
  ["$ma__shenji2"] = "",
}

ma__shenji:addEffect(fk.BeforeCardUseEffect, {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(ma__shenji.name) and #data.tos > 1 and
      table.contains(data.tos, player)
  end,
  on_use = function(self, event, target, player, data)
    local new_tos = {}
    for _, to in ipairs(data.tos) do
      if to ~= player then
        table.insert(new_tos, to)
      end
    end
    for _, to in ipairs(data.tos) do
      if to == player then
        table.insert(new_tos, to)
      end
    end
    data.tos = new_tos
  end,
})

return ma__shenji